Skip to content

Conversation

@LevisNgigi
Copy link
Contributor

SUMMARY

This change prevents request storms caused by Dynamic Group By chart customizations by aligning chart refresh behavior with the existing native filters pattern.
Previously, applying or saving chart customizations triggered a forced re-query of all charts on the dashboard, regardless of whether they were affected. This caused unnecessary request fan-out and excessive /api/v1/chart/data traffic on dashboards with many charts.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:
Screenshot from 2026-01-07 20-47-03

AFTER;
Screenshot from 2026-01-07 21-02-31

TESTING INSTRUCTIONS

1)Open a dashboard with multiple charts (ideally 10+).
2)Configure Dynamic Group By / Chart Customization for one or more charts.
3)Open the browser DevTools → Network tab (filter by /api/v1/chart/data).
4)Apply the chart customization.

Verify:

1)Only charts affected by the customization issue /api/v1/chart/data requests.
2)Unaffected charts do not re-query.
3)Each affected chart triggers only one request per apply action.
4)No repeated or cascading requests are observed.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 7, 2026

Code Review Agent Run #a7fcbb

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: b3e113d..b3e113d
    • superset-frontend/src/dashboard/actions/chartCustomizationActions.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot bot added the dashboard:performance Related to Dashboard performance label Jan 7, 2026
@codeant-ai-for-open-source
Copy link
Contributor

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Possible Bug
    The code assumes getRelatedChartsForChartCustomization always returns an array of valid chart IDs and directly spreads its result into affectedChartIds. If the helper returns null, undefined, a non-array, or values that are not numeric IDs, this will cause incorrect entries or runtime errors. Add defensive checks and normalize values to numbers before using them to build the affected list.

  • Possible Bug
    The code calls getRelatedChartsForChartCustomization(...) and pushes its result into affectedChartIds without validating the return value or element types. If the utility returns undefined, non-array, or non-numeric identifiers, dispatch(triggerQuery(true, chartId)) may be called with invalid arguments. Also ensure this behavior is correct for customizations that are removed (should they still trigger queries?).

  • Potential Dispatch Storm
    Even after narrowing down to related charts, the code dispatches a triggerQuery for every affected chart in a tight loop. For dashboards with many affected charts this can still cause many simultaneous requests. Consider filtering to existing slices, batching, or otherwise limiting concurrency.

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI finished reviewing your PR.

@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 13d2dad
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/69649f2b76228200081eb98b
😎 Deploy Preview https://deploy-preview-36955--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 7, 2026

Code Review Agent Run #e57967

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: b3e113d..497a574
    • superset-frontend/src/dashboard/actions/chartCustomizationActions.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@LevisNgigi LevisNgigi closed this Jan 7, 2026
@LevisNgigi LevisNgigi reopened this Jan 7, 2026
@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 7, 2026

Code Review Agent Run #4ba813

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: 497a574..9d222f4
    • superset-frontend/src/dashboard/actions/chartCustomizationActions.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
    • superset-frontend/src/dashboard/util/getRelatedCharts.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@geido geido added the 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR label Jan 8, 2026
@github-actions github-actions bot added 🎪 9d222f4 🚦 building Environment 9d222f4 status: building 🎪 9d222f4 📅 2026-01-08T11-07 Environment 9d222f4 created at 2026-01-08T11-07 🎪 9d222f4 🤡 geido Environment 9d222f4 requested by geido 🎪 ⌛ 48h Environment expires after 48 hours (default) and removed 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR labels Jan 8, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

🎪 Showtime is building environment on GHA for 9d222f4

@geido
Copy link
Member

geido commented Jan 8, 2026

Can we add some test cases?

@github-actions github-actions bot added 🎪 9d222f4 🚦 deploying Environment 9d222f4 status: deploying 🎪 9d222f4 🚦 running Environment 9d222f4 status: running 🎪 🎯 9d222f4 Active environment pointer - 9d222f4 is receiving traffic 🎪 9d222f4 🌐 54.185.229.79:8080 Environment 9d222f4 URL: http://54.185.229.79:8080 (click to visit) and removed 🎪 9d222f4 🚦 building Environment 9d222f4 status: building 🎪 9d222f4 🚦 deploying Environment 9d222f4 status: deploying 🎪 9d222f4 🚦 running Environment 9d222f4 status: running labels Jan 8, 2026
@github-actions github-actions bot added 🎪 ac87ca2 🤡 msyavuz Environment ac87ca2 requested by msyavuz 🎪 ⌛ 48h Environment expires after 48 hours (default) labels Jan 13, 2026
@github-actions
Copy link
Contributor

🎪 Showtime is building environment on GHA for ac87ca2

@github-actions
Copy link
Contributor

🎪 Showtime is building environment on GHA for ac87ca2

@github-actions
Copy link
Contributor

🎪 Showtime is building environment on GHA for ac87ca2

@github-actions github-actions bot added 🎪 ac87ca2 🚦 deploying Environment ac87ca2 status: deploying 🎪 ac87ca2 🚦 failed Environment ac87ca2 status: failed 🎪 ac87ca2 🚦 running Environment ac87ca2 status: running 🎪 🎯 ac87ca2 Active environment pointer - ac87ca2 is receiving traffic 🎪 ac87ca2 🌐 35.163.128.103:8080 Environment ac87ca2 URL: http://35.163.128.103:8080 (click to visit) and removed 🎪 ac87ca2 🚦 building Environment ac87ca2 status: building 🎪 ac87ca2 🚦 deploying Environment ac87ca2 status: deploying 🎪 ac87ca2 📅 2026-01-13T14-42 Environment ac87ca2 created at 2026-01-13T14-42 🎪 ac87ca2 🚦 failed Environment ac87ca2 status: failed 🎪 ac87ca2 🚦 running Environment ac87ca2 status: running 🎪 🎯 ac87ca2 Active environment pointer - ac87ca2 is receiving traffic labels Jan 13, 2026
@github-actions
Copy link
Contributor

🎪 Showtime deployed environment on GHA for ac87ca2

Environment: http://35.163.128.103:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

[...allKeys].forEach(filterKey => {
// Skip chart customization filters - they are handled separately by saveChartCustomization
// which triggers queries only for affected charts
if (filterKey.startsWith('chart_customization_')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is pretty fragile. Any better check? Maybe centralizing it?

@github-actions github-actions bot removed 🎪 ac87ca2 🚦 running Environment ac87ca2 status: running 🎪 ac87ca2 🌐 35.163.128.103:8080 Environment ac87ca2 URL: http://35.163.128.103:8080 (click to visit) 🎪 ac87ca2 📅 2026-01-13T14-43 Environment ac87ca2 created at 2026-01-13T14-43 🎪 ac87ca2 🤡 msyavuz Environment ac87ca2 requested by msyavuz labels Jan 15, 2026
@LevisNgigi LevisNgigi closed this Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard:performance Related to Dashboard performance size/XL 🎪 ⌛ 48h Environment expires after 48 hours (default)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants